<template>
	<div class="email">
		<!-- lilei@gmail.com -->
		<button @click="handleClick">press press!!!</button>
	</div>
</template>
<script>
	export default {
		methods: {
			handleClick() {
				// 把事件提交给bus(触发当前实例上的事件)
				this.$bus.$emit("on-click", "hello");
			}
		},
		mounted() {
			// console.log(this.$bus);
			this.$bus.$on("on-click", msg => console.log(msg));
		}
	};
</script>
<style>
	.email {
		border: 1px solid blue;
	}
</style>
